<!DOCTYPE html>
<html>

    <head>
        <title><g:layoutTitle default="Grails" /></title>
        <link rel="stylesheet" href="${createLinkTo(dir:'css',file:'main.css')}" />
        <link rel="shortcut icon" href="${createLinkTo(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
        %{--<g:javascript library="application" />--}%
        <g:javascript library="prototype" />
        <g:layoutHead/>
        <%--<g:render template="/layouts/header"/>       --%>
    </head>
    <body onload="${pageProperty(name:'body.onload')}>
     <!-- Spinner in Tab -->
        <div id="spinner" class="spinner" style="display:none;"><img src="${createLinkTo(dir:'images',file:'spinner.gif')}" alt="Spinner" /></div>

        <div id="header">
            <!-- Ganzhull Icon -->
            <div class="logo" style="vertical-align: top;"><img src="${createLinkTo(dir:'images',file:'Ganzhull_Logo.JPG')}" alt="AuctionHaus" >
               <!-- Login to be displayed in the header -->
                <div id="loginBox" class="loginBox">
                    <!-- If the user is already logged in show the "welcome" message -->
                    <g:if test="${session?.customer}">
                        <div style="text-align: right;">
                            <h2>Welcome back <span id="emailAddress">${session?.customer?.getLoginName()}!</span></h2>
                            <g:link controller="customer" action="logout"><h1>Logout</h1></g:link>
                        </div>
                    </g:if>
                    <g:else>
                       <g:form name="loginForm"
                           url="[controller:'customer', action:'login']">
                           <div style="text-align: right;">
                               <h2>Customer Email Address:</h2>
                               <g:textField name="emailAddress" ></g:textField>
                               <h2>Password:</h2>
                               <g:passwordField name="password" />
                           </div>
                           <input type="submit" value="Login" style="float: right;"/>
                       </g:form>
                    </g:else>
                </div>
            </div>
             <div id="navmenu">
                <g:render template="/layouts/menuBar"/>
             </div>
        </div>
        <div id="body"/>
        <g:layoutBody/>
        <br>
        <div id="footer" style="float:left;display:inline-block;">
            <g:render template="/layouts/footer"/>
        </div>
    </body>
</html>